﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="msg.aspx.cs" Inherits="msg" %>
<%@ Register Src="inc/bottom.ascx" TagName="bottom" TagPrefix="bottom" %>
<%@ Register Src="inc/top.ascx" TagName="top" TagPrefix="top" %>
<%@ Register Src="inc/left.ascx" TagName="left" TagPrefix="left" %>
<%@ Register Src="inc/channelImg.ascx" TagName="channelImg" TagPrefix="channelImg" %>
<%@ Register Src="inc/location.ascx" TagName="location" TagPrefix="location" %>

<top:top ID="top" runat="server" />
<channelImg:channelImg ID="channelImg" runat="server" />
<location:location ID="location" runat="server" />
<div class="sub_main">
<left:left ID="left" runat="server" />
        <div class="sub_main_right">
		<div class="b_box_top">&nbsp;</div>
        <div class="b_box_middle"> 
        <script>
        function checkForm(){
            if(document.getElementById("title").value==""){
                alert("请输入联系人");
                document.getElementById("title").focus();
                return false;
            }
            if(document.getElementById("telephone").value==""){
                alert("请输入联系电话");
                document.getElementById("telephone").focus();
                return false;
            }
            if (!IsTelephone(document.getElementById("telephone").value)) {
                alert("请输入正确的联系电话(例:0371-56689880 或 15900000000)");
                document.getElementById("telephone").focus();
                return false;
            }
            if(document.getElementById("content").value==""){
                alert("请输入留言内容");
                document.getElementById("content").focus();
                return false;
            }
            if (document.getElementById("safecode").value == "") {
                alert("请输入验证码");
                document.getElementById("safecode").focus();
                return false;
            }
            order_form.submit();
        } //去空格
        String.prototype.Trim = function () {
            var m = this.match(/^\s*(\S+(\s+\S+)*)\s*$/);
            return (m == null) ? "" : m[1];
        }

        function IsTelephone(obj)// 正则判断
        {
            var reg = /^(13[0-9]{9}$)|(15[0-35-9][0-9]{8}$)|([0-9]{1}[0-9]{2,3}-[1-9]{1}[0-9]{5,8}$)|(18[05-9][0-9]{8}$)/;
            return reg.test(obj.Trim());  
        } 

        </script>
        <form name="order_form" action="/msgDo.aspx?channel=<%=Request["channel"] %>" method="post" >
        		<div class="dingdan_title" id="code">在线留言</div>
                <div class="dingdan_content">好的想法与好的契机转瞬即逝，您有任何创意的想法和计划，都请您尽快和我们取得联系，我们将与您进一步沟通。</div>
                <div class="dingdan_title_b">联系人:</div>
                <div class="dingdan_title_c" >联系电话:</div>
                <div class="dingdan_content_b"><input name="title" type="text" value="" class="dingdan_box_a" /></div>
                <div class="dingdan_content_c" ><input name="telephone" type="text" value="" class="dingdan_box_a" /></div>
                <div class="dingdan_title">留言内容:</div>
                <div class="dingdan_content"><textarea name="content" cols="" rows="" class="dingdan_box_c"></textarea></div>
                <div class="dingdan_content">验证码:<input name="safecode" maxlength="4" id="safecode" type="text" value="" style="width:50px" class="dingdan_box_a" />
                <asp:Label ID="code" runat="server"></asp:Label>
                </div>
                <div class="dingdan_content">
                <a class="dingdan_send" style="cursor:pointer;" onclick="checkForm()" ></a>
                <span class="dingdan_sm">*请仔细填写，我们将有专人与您取得联系。</span></div>
        </form>
        </div>
        <div class="b_box_bottom">&nbsp;</div>
        </div>
</div>
<!---about end --->
<bottom:bottom ID="bottom" runat="server" /></div>
</body>
</html>